I don't know if people know about this thing, but many modules use the match()
funciton from match.c inside lsapi folder for pattern matching.  I guess most of
you do not know about the power of this pattern matching.

1)
Ok, first, an exact match would be something like(using VWMSticky as example)

*VWMSticky chaku

That would stick any window that has the title or classname equal exactly to "chaku"

Now for something that's more common

*VWMSticky *chaku*

The '*' menas that it will match for any sequence of characters, zero or more.
Althought it might seem a bit ambiguous, but it actually will match and stick
any window that contains the word chaku in the title or class name. I usually
use this technique when i'm too lazy to find out about he actual window class name.

2)
if there is '*', then there must be '?'

*VWMSticky ch?ku

Be careful about this '?' because it will match for any one character, and not zero or one.

3)
The next technique, probably people aren't very familiar with is the [SET] option.
this option lets you match any character that's in the set.

*VWMSticky [ebdca]haku		;This will match "ehaku", "bhaku", "dhaku", "chaku", "ahaku"

You can also have range in a set.

*VWMSticky [a-z]haku		;this will match anything starting with a to z and then "haku"

*VWMSticky [0-9]haku		;this will match anything start with a digit, then "haku"

*VWMSticky [0-9a-z]haku		;this will match anything start with a to z or 0 to 9 then "haku"

This range can start with any 8-bit characters and end with any 8-bit characters.  You can also start
backwards like [k-c] and [8-2]

4)
The previous [SET] option, you can also add a '!' or '^' right after the first bracket, then the [SET]
will be inversed.  So it will match any character that is not in the set

*VWMSticky [!a-z]haku		;matches for the first character that doesn't start from a to z, then matches for "haku"
*VWMSticky [^a-z]haku		;same effect as the one above

5)
Of course, if a window title you want to match contains anything like '[', ']', '*', '? or '!', '^' in a [SET] as the first character,
then you've got problem, because the function will misinterpret it.  So what should we do? Just like programming,
we use a '\' in front of those key characters, and the function will match the pattern with no problem.  Of course if
you ever want to match for a '\', you got to put it like '\\', with another slash preceding it.

6)
Besides VWMSticky, VWMStartWindowsOnDesktop also uses the same function, so matching will be the same.
If you are unsure about whether a setting is using the match() to match windows' title and class name, you can just
get the source, and search the file for "match("

*notice it's not "match()", cause then you won't get nothing.

Of course, you can always use winspy or something to find out the exact window class name or something, but just
in case you are too lazy. hehehe.......

I guess this is all.  Let me know if there's anything wrong or need to add anything ;-)

hmmm, after thinking more about winspy, i guess you don't really have to know about this.  Just thought it's interesting
and in case those pattern matching might come in handy sometimes.
If you want to get winspy, which will tell you the exact classname of the window, it's available at utilities section at
http://www.litestep.net

AM 03:30 2000/11/24
Chao-Kuo Lin (Chaku)
chaokuo@iname.com
